import {Routes, RouterModule} from '@angular/router';
import {ModuleWithProviders} from '@angular/core';
import {AddComponent} from './add/add.component';
import {EditComponent} from './edit/edit.component';
import {DisplayComponent} from "./display.component";
import {ViewComponent} from "./view/view.component";
import {DisplayGuard} from "./displayGuard";
import {ListComponent} from "./list/list.component";
import {Edit1Component} from "./edit1/edit1.component";
import {Add1Component} from "./add1/add1.component";

export const routes: Routes = [
  {
    path: '',
    component: DisplayComponent,
    // canActivate:[DisplayGuard],
    // children: [
    //   {path:'add/:showcaseId/:boothNumber',component: AddComponent},
    //   {path:'edit/:showcaseId/:id/:boothNumber',component: EditComponent},
    //   {path:':showcaseId/:id/:boothNumber',component: ViewComponent},
    // ],
  },
    {path:'list',component: ListComponent},
    {path:'list/:id',component: ListComponent},
    {path:'add/:id',component: Add1Component},
    {path:'edit',component: Edit1Component},
    // {path: '**', redirectTo: '/member', pathMatch: 'full'}
];


export const routing: ModuleWithProviders = RouterModule.forChild(routes);
